package org.lq.his.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.lq.his.dao.DictionaryDao;
import org.lq.his.pojo.Dictionary;
import org.lq.his.pojo.Section;
import org.lq.his.service.DictionaryService;
import org.springframework.stereotype.Service;

@Service("dictionaryService")
public class DictionaryServiceImpl implements DictionaryService{
	
	@Resource
	private DictionaryDao dictionaryDao;
	
	public void setDictionaryDao(DictionaryDao dictionaryDao) {
		this.dictionaryDao = dictionaryDao;
	}

	//查询所有
	@Override
	public List<Dictionary> getAll() {
		
		return dictionaryDao.getAll();
	}

	//分页查询
	@Override
	public List<Dictionary> getListByCondition(int start, int limit, Dictionary condition, String column,
			String orderBy) {
		
		return dictionaryDao.getListByCondition(start, limit, condition, column, orderBy);
	}

	//查询条数
	@Override
	public Integer getCountByCondition(Dictionary condition) {

		return dictionaryDao.getCountByCondition(condition);
	}

	//查询父级
	@Override
	public List<Dictionary> getParent() {
		
		return dictionaryDao.getParent();
	}

	//查询父级ID
	@Override
	public Dictionary getparentId(Integer parentId) {
		
		return dictionaryDao.getParentId(parentId);
	}

	//添加父类
	@Override
	public void getAddParent(Dictionary parent) {
		
		dictionaryDao.getAddParent(parent);
	}

	//添加子类
	@Override
	public void add(Dictionary subgrade) {
		
		dictionaryDao.add(subgrade);
	}

	//根据ID查询
	@Override
	public Dictionary getById(Integer id) {
		
		return dictionaryDao.getById(id);
	}

	//修改子类
	@Override
	public void update(Dictionary dictionary) {
	
		dictionaryDao.update(dictionary);
	}

	//逻辑删除state
	@Override
	public void getEditState(Integer[] ids) {
		
		dictionaryDao.getEditState(ids);
	}

	//修改父类
	@Override
	public void getEditParent(Dictionary dictionary) {
		
		dictionaryDao.getEditParent(dictionary);
	}

	@Override
	public List<Dictionary> getDictionaryValueByKey(String key) {
		
		return dictionaryDao.getDictionaryValueByKey(key);
	}

	
	

}
